﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SilverlightDemo
{
    public partial class LayoutContainers : UserControl
    {
        public LayoutContainers()
        {
            InitializeComponent();

            //LayoutRoot.Background = new SolidColorBrush(Colors.LightGray);
        }

        private void btnClick_Click(object sender, RoutedEventArgs e)
        {
            Button senderBtn = (Button)sender;
            senderBtn.Content = "You Clicked Me";
        }

        private void LayoutRoot_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            int blue = new Random().Next(255);
            LayoutRoot.Background = new SolidColorBrush(Color.FromArgb(255, 0, 0, (byte)blue));
        }
    }
}
